#include "mysubwidget.h"

MySubWidget::MySubWidget(QWidget *parent) : QWidget(parent)
{
    this->setMinimumSize(300,300);
    btn.setParent(this);
    btn.setText("打开父窗口!");
    btn.move(100,100);

    connect(&btn,&QPushButton::clicked,[this]{emit openParentWindow();});
}
